package app.netant.book.txt008;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Txt008Root extends BaseRoot {
	
	public Txt008Root(){
		this.homeUrl = "http://008txt.com/download/1-1.html";
		this.pageUrl = "http://008txt.com/download/1-";
		this.tableKey = "txt008";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new Txt008Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Txt008Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Txt008Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Txt008Root root = new Txt008Root();
		root.setBaseType("玄幻魔法");
		root.analyse(1712);
		
		//root.excepCycle();
	}


	
}
